home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Graphics 3D / SetupGL / SetupDSp.h < prev    next >
Encoding:
Text File  |  2000-09-28  |  4.3 KB  |  104 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        SetupDSp.h
  3.  
  4.     Contains:    Functions to enable building and destorying a DSp fullscreen context
  5.  
  6.     Written by:    Geoff Stahl (ggs)
  7.  
  8.     Copyright:    Copyright © 1999 Apple Computer, Inc., All Rights Reserved
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <4>     1/26/00    ggs     Add fade code back in, ensure NULL pointer/context checks are in
  13.          <3>     1/24/00    ggs     Add C++ support
  14.          <2>    12/18/99    ggs     Fix headers
  15.          <1>    11/28/99    ggs     Initial add.  Split of just DSp handling functions.  Added total
  16.                                     device RAM checks, better step downs using actual supported
  17.                                     resolutions. Need to add user verify for contexts that require
  18.                                     it, integration of this in context step down, and a freq bit
  19.                                     field.
  20.          <1>    11/11/99    ggs     Initial Add
  21.  
  22.     Disclaimer:    IMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.
  23.                 ("Apple") in consideration of your agreement to the following terms, and your
  24.                 use, installation, modification or redistribution of this Apple software
  25.                 constitutes acceptance of these terms.  If you do not agree with these terms,
  26.                 please do not use, install, modify or redistribute this Apple software.
  27.  
  28.                 In consideration of your agreement to abide by the following terms, and subject
  29.                 to these terms, Apple grants you a personal, non-exclusive license, under Apple’s
  30.                 copyrights in this original Apple software (the "Apple Software"), to use,
  31.                 reproduce, modify and redistribute the Apple Software, with or without
  32.                 modifications, in source and/or binary forms; provided that if you redistribute
  33.                 the Apple Software in its entirety and without modifications, you must retain
  34.                 this notice and the following text and disclaimers in all such redistributions of
  35.                 the Apple Software.  Neither the name, trademarks, service marks or logos of
  36.                 Apple Computer, Inc. may be used to endorse or promote products derived from the
  37.                 Apple Software without specific prior written permission from Apple.  Except as
  38.                 expressly stated in this notice, no other rights or licenses, express or implied,
  39.                 are granted by Apple herein, including but not limited to any patent rights that
  40.                 may be infringed by your derivative works or by other works in which the Apple
  41.                 Software may be incorporated.
  42.  
  43.                 The Apple Software is provided by Apple on an "AS IS" basis.  APPLE MAKES NO
  44.                 WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
  45.                 WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  46.                 PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
  47.                 COMBINATION WITH YOUR PRODUCTS.
  48.  
  49.                 IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
  50.                 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  51.                 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  52.                 ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
  53.                 OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT
  54.                 (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
  55.                 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  56.  
  57. */
  58.  
  59.  
  60. // Usage notes: 
  61.  
  62.  
  63.  
  64. // include control --------------------------------------------------
  65.  
  66. #ifndef SetupDSp_h
  67. #define SetupDSp_h
  68.  
  69.  
  70. // includes ---------------------------------------------------------
  71.  
  72. #include <DrawSprocket.h>
  73.  
  74. //#include <agl.h>
  75.  
  76. #include "SetupGL.h"
  77.  
  78. #ifdef __cplusplus
  79. extern "C" {
  80. #endif
  81.  
  82. // structures (public) -----------------------------------------------
  83.  
  84. enum { fadeTicks = 10 };
  85.  
  86. // public function declarations -------------------------------------
  87.  
  88. OSStatus StartDSp (void);
  89. void ShutdownDSp (void);
  90.  
  91. OSStatus BuildDSpContext (DSpContextReference* pdspContext, GDHandle hGD, GLint depthSizeSupport, pstructGLInfo pcontextInfo);
  92. void DestroyDSpContext (DSpContextReference* pdspContext);
  93.  
  94. OSStatus DSpContext_CustomFadeGammaOut (DSpContextReference inContext, const RGBColor *fadeColor, long fadeTicks); 
  95. OSStatus DSpContext_CustomFadeGammaIn (DSpContextReference inContext, const RGBColor *fadeColor,  long fadeTicks);
  96.  
  97. extern Boolean gDSpStarted;
  98. extern Boolean gNeedFade;
  99.  
  100. #ifdef __cplusplus
  101. }
  102. #endif
  103.  
  104. #endif // SetupDSp_h